<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
		<title><h:outputText value="#{index.constant.siteName}" /></title>
</h:head>

<h:body>
	<h:form>
		<h:dataTable id="categorys" value="#{categoryBean.allCategory}"
			var="category">
			<h:column>
				<f:facet name="header">
					<h:outputText value="栏目ID" />
				</f:facet>
				<h:outputText value="#{category.id }"></h:outputText>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="栏目名称" />
				</f:facet>
				<h:outputText value="#{category.name }"></h:outputText>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="depth" />
				</f:facet>
				<h:outputText value="#{category.depth}"></h:outputText>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="数据量" />
				</f:facet>
					<h:outputText value="#{category.artCount}"></h:outputText>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="访问" />
				</f:facet>
				<h:outputLink value="/c/#{category.id}.html">
					<h:outputText value="访问"></h:outputText>
				</h:outputLink>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value=" 管理操作 " />
				</f:facet>
				<h:outputText value=" 添加子栏目 | "></h:outputText>
				<h:commandLink action="#{categoryBean.edit}" value="修改" />
				<h:outputText value=" | "></h:outputText>
				<h:commandLink actionListener="#{categoryBean.delAllArt}">
					<f:param name="id" value="#{category.id}"></f:param>
					<h:outputText value=" 清空  "></h:outputText>
				</h:commandLink>
				<h:outputText value=" | "></h:outputText>
				<h:commandLink actionListener="#{categoryBean.del}">
					<h:outputText value=" 删除 "></h:outputText>
				</h:commandLink>
			</h:column>
		</h:dataTable>
		<h:commandLink action="#{categoryBean.add}" value="AddNew Category"></h:commandLink>
	</h:form>
</h:body>
</html>

